package com.wlyuan.open.scanner.utils.enums.order;

import lombok.Getter;

/**
 * @author lijing
 * @Description 老系统订单类型，1 客户订单 2 运输订单 3 拼车订单
 */
@Getter
public enum OrderSrcClassEnum {

    /**
     * 客户订单
     */
    CLIENT_ORDER("客户订单", 1L),
    /**
     * 运输订单
     */
    TRANSPORT_ORDER("运输订单", 2L),
    /**
     * 拼车订单
     */
    COMBINE_ORDER("拼车订单", 3L);

    private String name;
    private Long value;

    OrderSrcClassEnum(String name, Long value) {
        this.value = value;
        this.name = name;
    }

    public static boolean isOrder(Long val) {
        return CLIENT_ORDER.getValue().equals(val);
    }

    public static boolean isTransport(Long val) {
        return TRANSPORT_ORDER.getValue().equals(val);
    }

    public static boolean isCombine(Long val) {
        return COMBINE_ORDER.getValue().equals(val);
    }
}
